<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Api;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::group(['namespace'=>'Api','prefix' => 'user'],function (){
    Route::post('test_login',[Api\LoginController::class,'test_login']);
    Route::post('wx_login',[Api\LoginController::class,'wx_login']);
    Route::post('test_fj',[Api\LoginController::class,'test_fj']);
    Route::post('test_tuikuan',[Api\LoginController::class,'test_tuikuan']);

    Route::post('goods_list',[Api\IndexController::class,'goods_list']);
    Route::post('coupon_type_list',[Api\IndexController::class,'coupon_type_list']);
    Route::post('noticle_list',[Api\IndexController::class,'noticle_list']);
    Route::post('banner_list',[Api\IndexController::class,'banner_list']);

    Route::any('wx_order_notify',[Api\NotifyController::class,'wx_order_notify']);

});

Route::group(['namespace'=>'Api','prefix' => 'user','middleware' =>'user_token'],function (){
    Route::post('goods_info',[Api\GoodsController::class,'goods_info']);
    Route::post('buy_goods',[Api\GoodsController::class,'buy_goods']);
    Route::post('pay_order',[Api\GoodsController::class,'pay_order']);
    Route::post('my_order',[Api\OrderController::class,'my_order']);
    Route::post('my_order_info',[Api\OrderController::class,'my_order_info']);

});